package com.yunshipei.core.model;

import android.os.Parcel;
import android.os.Parcelable;

public class CookieModel implements Parcelable {
    private String url = "";
    private String cookieStr = "";

    public CookieModel(String url, String cookieStr) {
        this.url = url;
        this.cookieStr = cookieStr;
    }

    protected CookieModel(Parcel in) {
        url = in.readString();
        cookieStr = in.readString();
    }

    public static final Creator<CookieModel> CREATOR = new Creator<CookieModel>() {
        @Override
        public CookieModel createFromParcel(Parcel in) {
            return new CookieModel(in);
        }

        @Override
        public CookieModel[] newArray(int size) {
            return new CookieModel[size];
        }
    };

    public String getUrl() {
        return url;
    }

    public String getCookieStr() {
        return cookieStr;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(url);
        dest.writeString(cookieStr);
    }
}
